﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>健身中心</title>
    	<link href="../css/mui.min.css" rel="stylesheet" />
		<script src="../script/mui.min.js"></script>
    <link rel="stylesheet" href="../css/MyOrder.css">
    <script src="../script/jquery-1.12.4.min.js" type="text/javascript"></script>
    <script src="../script/JsUrl.js" type="text/javascript"></script>
    <script type="text/javascript" src="../script/MyOrder.js"></script>
    <script src="../script/utils.js"></script>
</head>
<body>
  <ul class="mui-table-view order">
  	<li class="mui-table-view-cell ordertitle">预约记录</li>
    <li class="mui-table-view-cell running" name="1">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
        		<img src="../img/running.png">
        	</div>
        	<div class="mui-col-sm-11">进行中</div>
        </div>
         <span id="aaa" class="mui-badge mui-badge-primary"> </span>
    </li>
    

    <li class="mui-table-view-cell end"  name="3">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
        		<img src="../img/end.png">
        	</div>
        	<div class="mui-col-sm-11">已结束</div>
        </div>
        <span id="aaa2" class="mui-badge mui-badge-primary"> </span>
    </li>
    <li class="mui-table-view-cell revoke" name="4">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
    			<img src="../img/revoke.png">
        	</div>
        	<div class="mui-col-sm-11">已撤销</div>
        </div>
        <span id="aaa3" class="mui-badge mui-badge-primary"> </span>
    </li>
    <li class="mui-table-view-cell stop" name="5">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
    			<img src="../img/stop.png">
        	</div>
        	<div class="mui-col-sm-11">已终止</div>
        </div>
        <span id="aaa4" class="mui-badge mui-badge-primary"> </span>
    </li>
  </ul>
  <div class="spacediv"></div>
  <ul class="mui-table-view invitation">
  	<li class="mui-table-view-cell invitationtitle">受邀记录</li>
    <li class="mui-table-view-cell  myorder " name="0">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
    			<img src="../img/myorder.png">
        	</div>
        	<div class="mui-col-sm-11">待处理</div>
        	</div>
        	<span id="bbb" class="mui-badge mui-badge-primary"> </span>
    </li>
    <li class="mui-table-view-cell orderaccept" name="1">
    	<div class="mui-row">
        	<div class="mui-col-sm-1">
    			<img src="../img/orderdata.png">
        	</div>
        	<div class="mui-col-sm-11 ">已接受</div>
        </div>
        <span id="bbb2" class="mui-badge mui-badge-primary"> </span>
    </li>
     <li class="mui-table-view-cell orderrefuse" name="2">
      <div class="mui-row">
          <div class="mui-col-sm-1">
          <img src="../img/orderjvjue.png">
          </div>
          <div class="mui-col-sm-11 ">已拒绝</div>
        </div>
        <span id="bbb3" class="mui-badge mui-badge-primary"> </span>
    </li>
      <li class="mui-table-view-cell revoked" name="3">
      <div class="mui-row">
          <div class="mui-col-sm-1">
          <img src="../img/chexiao.png">
          </div>
          <div class="mui-col-sm-11 ">被撤销</div>
        </div>
        <span id="bbb4" class="mui-badge mui-badge-primary"> </span>
    </li>
  </ul>
  <div class="footer">
  	<div class="footer_left" onclick="ayuyue()"><a>预约</a></div>
    <div class="footer_right"><a href="#">我的预约</a></div>
  </div>
 
</body>

<script type="text/javascript">
	var subscribeUserName;
	var subscribeUserEmail;
	$(function() { 
	    mui.init();
	    /*给li绑定事件，点击后将name属性值传递过去*/
		$(".running").on("click",function(){
			var state = $(".running").attr("name");
			window.location.href="MyOrderDetailed.html?state="+state+"&flagePage=MyOrder";
		});
		$(".end").on("click",function(){
			var state = $(".end").attr("name");
			window.location.href="MyOrderDetailed.html?state="+state+"&flagePage=MyOrder";
		});
		$(".revoke").on("click",function(){
			var state = $(".revoke").attr("name");
			window.location.href="MyOrderDetailed.html?state="+state+"&flagePage=MyOrder";
		});
		$(".stop").on("click",function(){
			var state = $(".stop").attr("name");
			window.location.href="MyOrderDetailed.html?state="+state+"&flagePage=MyOrder";
		});


    $(".myorder").on("click",function(){
      var state = $(".myorder").attr("name");
     window.location.href="MyInviteDetailed.html?state="+state+"&flagePage=MyInvite";
    });
    $(".orderaccept").on("click",function(){
      var state = $(".orderaccept").attr("name");    
     window.location.href="MyInviteDetailed.html?state="+state+"&flagePage=MyInvite";
    });
    $(".orderrefuse").on("click",function(){
     var state = $(".orderrefuse").attr("name");    
      window.location.href="MyInviteDetailed.html?state="+state+"&flagePage=MyInvite";
    });
     $(".revoked").on("click",function(){
     var state = $(".revoked").attr("name");    
     window.location.href="MyInviteDetailed.html?state="+state+"&flagePage=MyInvite";
    });
        window.native.webGetUserinfo("userCallBlack");

	});


	function userCallBlack(user){
      json = JSON.parse(user);
      
      //document.getElementById("adasdasdasdas").value=user;
      subscribeUserName  = json.user_name;
      subscribeUserEmail = json.user_email; 
      /*将获取的状态参数传递到JS方法中*/
      getSubscribeByEmailAndName(subscribeUserEmail,subscribeUserName,1);
      selectSubscribeSonByEmailAndName_Invite(subscribeUserEmail,subscribeUserName,0);
      //alert(subscribeUserName+"  "+subscribeUserEmail);
    }
    function ayuyue(){
 window.location.href="EquipmentDisplayy.html";
    }
</script>

</html>
